<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            height: 100px;
        }
    </style>
</head>
<body>
    <div class="box" style="background-color: pink; width: 100px;"></div>
    <script>
        let box1 = document.querySelector('.box');
        console.log(box1);
        let width = box1.currentStyle;
        console.log(width);

    </script>
</body>
</html>